package ycl.scheduled.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ycl.scheduled.common.base.mapper.BaseDao;
import ycl.scheduled.entity.SysUserScheduled;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户日程安排 Mapper 接口
 * </p>
 *
 * @author ycl
 * @since 2022-01-20 00:04:45
 */
@Mapper
public interface SysUserScheduledMapper extends BaseDao<SysUserScheduled> {

	/**
	 * 查询当前时间最近日程的时间差
	 *
	 * @param userId     用户id
	 * @param expireTime 日程时间
	 * @return 最近的日程
	 */
	SysUserScheduled selectLatelyTimeDiffByUserId(@Param("userId") Long userId, @Param("time") LocalDateTime expireTime);
}
